package rabbit.flt.core.interceptor;

import net.bytebuddy.implementation.bind.annotation.AllArguments;
import net.bytebuddy.implementation.bind.annotation.RuntimeType;
import net.bytebuddy.implementation.bind.annotation.This;
import rabbit.flt.core.AbstractMethodInterceptor;
import rabbit.flt.plugins.common.Matcher;

/**
 * 构造函数拦截器
 */
public class ConstructorInterceptor extends AbstractMethodInterceptor {

    public ConstructorInterceptor(Matcher matcher) {
        super(matcher);
    }

    @RuntimeType
    public void doIntercept(@AllArguments Object[] args, @This Object objectEnhanced) {
        after(objectEnhanced, null, args, null);
    }

}

